<?php $cakeDescription = __d('Siscel', 'Sistema de Controle Eletr&ocirc;nico de Laudos'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <?
        Header('Cache-Control: no-cache');
        Header('Pragma: no-cache');
        ?>
        <title>
            <?php echo $cakeDescription ?>:
            <?php echo $title_for_layout; ?>
        </title>
        <?php
        echo $this->Html->meta('icon');
        echo $this->Html->css('siscel');
        echo $this->Html->css('cake.generic');
//        echo $this->Html->css('plugin/formee/formee-style');
        //echo $this->Html->css('table_jui');
        echo $this->Html->css('menu/styles');
        echo $this->Html->css('menu');
//        echo $this->Html->css('jquery-ui-1.7.1.custom');
        echo $this->Html->css('jquery-ui-1.10.2.custom');
        echo $this->Html->css('ui.multiselect');
        echo $this->Html->css('colorbox');
        echo $this->Html->script('jquery-1.9.1');
        echo $this->Html->script('jquery.colorbox');
        echo $this->Html->script('jquery-ui-1.10.2.custom');
        echo $this->Html->script('ui.multiselect');
        echo $this->Html->script('jquery.dataTables');
        echo $this->Html->script('ddaccordion');
        echo $this->Html->script('jquery.cpf-validate.1.0.min');
        echo $this->Html->script('jquery.MultiFile');
        echo $this->Html->script('mascara');
        echo $this->Html->script('siscel');
        echo $this->fetch('meta');
        echo $this->fetch('css');
        echo $this->fetch('script');
        echo $this->Js->writeBuffer();
        ?>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#icoNovoUser").colorbox({iframe: false, width: 750, height: true, initialHeight: "550", escKey: false, overlayClose: false,
                    onOpen: function() {
                    },
                    onLoad: function() {
                    },
                    onComplete: function() {
                    },
                    onCleanup: function() {
                    },
                    onClosed: function() {
                    }
                });
                // correcao do cmbo de ano e mes do datepicker
                $('.ui-datepicker-year').css('float', 'none');
            });
            function redireciona(url){
                window.location = url;
            }
        </script>
    </head>
    <body>
        <div id="cabecalho" align="center">
            <div id="cabecalhologo">
                <div id="logomarca">
                    <?php
                    echo $this->Html->link(
                        $this->Html->image('/img/logo_Siscel_p.png', array('alt' => 'Siscel home', 'border' => '0')), '/', array('target' => '_parent', 'escape' => false)
                    );
                    ?>
                    <span id="usuario"></span>
                </div>

            </div>
        </div>
        <div id="principal">
            <div id="menu">
                <div id="fotoUsuarioLogado">
                    <?php
                    $usuarioSession = $this->Session->read('usuario');
                    if (isset($usuarioSession['Usuario']['IM_FOTO'])) :
                        echo $this->Siscel->foto($usuarioSession['Usuario']['IM_FOTO'], 110, 110);
                    else:
                        echo $this->Html->image('/img/perfil.jpg', array('width' => '110', 'height' => '110', 'label' => null, 'style' => 'margin: 8px 4px'));
                    endif;
                    ?>
                    <?php echo($usuarioSession['Usuario']['NM_AUT']); ?>
                </div>
                <?php echo $this->element('menu', array('class' => 'cssmenu')) ?>
            </div>
            <?php echo $this->Form->end(); ?>
            <div id="conteudo">
                <div class="formee-msg-info"></div>
                <div id="mensagens">
                    <?php echo $this->Session->flash(); ?>
                </div>
                <?php echo $this->fetch('content'); ?>
            </div>
            <div id="menu2">
                <?php echo $this->element('menu2', array('class' => 'cssmenu')) ?>
            </div>
        </div>
        <?php //echo $this->element('sql_dump'); ?>
    </body>
    <script type="text/javascript">
        $(document).ready(function(){
            var altura = $('#conteudo').height() + 50;
            $('#menu').css('height', altura);
            $('#conteudo').css('height', altura);
            $('#menu2').css('height', altura);
        });
    </script>
</html>
